<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/5/8 0008
  Time: 10:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="../inc/header.jsp"></jsp:include>

<!-- Page Heading Section Start -->
<div class="page-heading-section section bg-parallax" data-bg-image="<%=path%>/assets/images/bg/bg-1.jpg" data-overlay="50">
    <div class="container">
        <div class="page-heading-content text-center">
            <h3 class="title">我的公司</h3>
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<%=path%>/web/index">网站首页</a></li>
            </ol>
        </div>
    </div>
</div>
<!-- Page Heading Section End -->

<!-- Create Job Start -->
<div class="section section-padding">
    <div class="container">
        <div class="row">
            <div class="create-job-form col-lg-10 mx-auto">
                <form action="<%=path%>/web/company/manage/companyUpdate" enctype="multipart/form-data" id="myForm" method="post">
                    <div class="row mb-n3">
                        <div class="col-md-6 col-12 mb-3">
                            <label for="companyName">公司名称</label>
                            <input type="hidden" name="id" value="${company.id}">
                            <input type="text" disabled="disabled" value="${company.companyName}" name="companyName" id="companyName" placeholder="万码学堂">
                            <c:if test="${companyAuthc.isPass eq true}">
                                <font color="#7cfc00">审核已通过</font>
                            </c:if>
                            <c:if test="${companyAuthc.isPass ne true}">
                                <font color="red">审核暂未通过</font>
                            </c:if>
                        </div>
                        <div class="col-md-6 col-12 mb-3">
                            <label for="scope">公司规模（人）</label>
                            <c:if test="${sessionScope.person.isCompanyAdmin eq true}">
                                <input type="text" value="${company.scope}" name="scope" id="scope" placeholder="100">
                            </c:if>
                            <c:if test="${sessionScope.person.isCompanyAdmin ne true}">
                                <input type="text" value="${company.scope}" disabled="disabled" name="scope" id="scope" placeholder="100">
                            </c:if>
                        </div>
                        <div class="col-md-6 col-12 mb-3">
                            <label>公司logo</label>
                            <img width="200px" src="<%=path%>/assets/images/companies/${company.logo}">
                            <input type="file" name="file" id="logo">
                        </div>

                        <div class="col-md-6 col-12 mb-3">
                            <label>营业执照</label>
                            <img width="200px" src="<%=path%>/static/companyLicenseImages/${companyAuthc.licensePic}">
                        </div>
                        <div class="col-md-6 col-12 mb-3">
                            <label for="suggestId">公司地址：${company.address}</label>
                            <c:if test="${sessionScope.person.isCompanyAdmin eq true}">
                                <input type="text" name="address" id="suggestId">
                                <div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
                                <div id="l-map" style="width: 500px"></div>
                            </c:if>
                        </div>
                        <div class="col-md-6 col-12 mb-3">
                            <label for="website">公司官网</label>
                            <c:if test="${sessionScope.person.isCompanyAdmin eq true}">
                                <input type="text" value="${company.website}"  name="website" id="website" placeholder="万码学堂">
                            </c:if>
                            <c:if test="${sessionScope.person.isCompanyAdmin ne true}">
                                <input type="text" value="${company.website}" disabled="disabled"  name="website" id="website" placeholder="万码学堂">
                            </c:if>
                        </div>
                        <div class="col-12 mb-3">
                            <label for="intro">公司简介</label>
                            <c:if test="${sessionScope.person.isCompanyAdmin eq true}">
                                <textarea id="intro" name="intro" rows="5">${company.intro}</textarea>
                            </c:if>
                            <c:if test="${sessionScope.person.isCompanyAdmin ne true}">
                                <textarea id="intro" disabled="disabled" name="intro" rows="5">${company.intro}</textarea>
                            </c:if>
                        </div>
                        <div class="col-12 mb-3">
                            <span id="info" style="color: red"></span>
                        </div>
                        <c:if test="${sessionScope.person.isCompanyAdmin eq true}">
                            <div class="col-12 mb-3">
                                <input type="button" id="myBtn" class="btn btn-primary px-5" value="保存修改">
                                <%--                            <button type="button" id="myBtn" class="btn btn-primary px-5">申请注册</button>--%>
                            </div>
                        </c:if>
                    </div>
                    <div class="row"></div>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- Create Job End -->

<script type="text/javascript" src="<%=path%>/assets/js/vendor/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="<%=path%>/assets/js/vendor/companyUpdateCheck.js.jsp"></script>
<%--BaiduMap--%>
<script type="text/javascript" src="<%=path%>/assets/js/vendor/baiduMap.js"></script>

<jsp:include page="../inc/footer.jsp"></jsp:include>

